package cn.stylefeng.guns.sys.modular.system.entity.Enum;

import lombok.Getter;


/**
 * 员工同步状态，枚举类
 *
 */
@Getter
public enum AttendEmployeeSynchronousStatusEnum {
    OLD_EMPLOYEE(0, "从员工表同步过来的"),
    NEW_EMPLOYEE_NOT_SUBMIT(1, "新增，未提交，未同步"),
    NEW_EMPLOYEE_SUBMIT(2, "新增，已提交，未同步"),
    NEW_EMPLOYEE_THROUGH(3, "新增，已审核通过，未同步"),
    NEW_EMPLOYEE_BACK(4, "新增，已驳回，未同步"),
    NEW_EMPLOYEE_SYNCHRONOUS(5, "新增，已审核通过，已同步");

    AttendEmployeeSynchronousStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    public static AttendEmployeeSynchronousStatusEnum getByMsg(String value){
        for(AttendEmployeeSynchronousStatusEnum attendAuditStatusEnum : values()){
            if (attendAuditStatusEnum.getMsg().equals(value)) {
                return attendAuditStatusEnum;
            }
        }
        return null;
    }

    public static AttendEmployeeSynchronousStatusEnum getByCode(Integer value){
        for(AttendEmployeeSynchronousStatusEnum attendAuditStatusEnum : values()){
            if (attendAuditStatusEnum.getCode().equals(value)) {
                return attendAuditStatusEnum;
            }
        }
        return null;
    }

}
